package xju_3_4.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import xju_3_4.entity.Stu;
import xju_3_4.entity.Student;
import xju_3_4.service.UserService;

@Repository
public class StudentDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void insert(Stu student) {
        String sql = "insert into student(name,sn,card_id,clazz_id)  values(?,?,?,?)";
        jdbcTemplate.update(sql,student.getName(),student.getSn(),student.getCardId(),student.getClazzId());
    }
}
